@extends('layouts.admin')
@push('morecss')
@endpush

@push('morescript')
@endpush
@section('content')
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            @foreach ($mpList as $mp)
                <div class="col-lg-3">
                    <div class="contact-box">
                        <div class="col-sm-4">
                            <div class="text-center">
                                <img alt="image" class="img-circle m-t-xs img-responsive" src="{{$mp->head_img}}">
                                <div class="m-t-xs font-bold">{{$mp->user_name}}</div>
                            </div>
                        </div>
                        <div class="col-sm-8">
                            <p>
                            <h3><strong>{{$mp->nick_name}}</strong></h3>
                            <p>{{$mp->nick_name}}</p>
                            @if($mp->verify_type == 0)
                                <span class="badge badge-success">微信认证</span>
                            @else
                                <span class="badge badge-danger">未认证</span>
                            @endif
                            @if($mp->authorization_state == 1)
                                <span class="badge badge-success">已授权</span>
                            @else
                                <span class="badge badge-danger">未授权</span>
                            @endif
                            @if($mp->use_state == 0)
                                <span class="badge badge-danger">审核失败</span>
                            @elseif($mp->use_state == 2)
                                <span class="badge badge-info">审核中...</span>
                            @else
                                <span class="badge badge-success">审核正常</span>
                                @endif
                                </p>
                                <p>
                                    @if(!empty($mp->refresh_token) && $mp->verify_type == 0 && $mp->authorization_state == 1 && $mp->use_state == 1)
                                        <a href="{{ route('admin.wxmplist.setuserwxmp', ['appid'=>$mp->appid]) }}"
                                           class="btn btn-primary">选择服务号</a>
                                    @endif
                                </p>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            @endforeach
            @can('admin.wxmpopenauthorizer.redirectauthorized')
                <div class="col-lg-2">
                    <div class="contact-box">
                        <div class="text-center">
                            <a class="btn-primary btn-circle btn-lg" href="{{route('admin.wxmpopenauthorizer.redirectauthorized')}}" target="_blank">
                                <i class="fa fa-plus"></i>
                                公众号接入</a>
                        </div>
                    </div>
                </div>
            @endcan
        </div>
    </div>
@endsection